<!-- templates/transfer.html -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Transfer - NeonBank</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/style.css') }}" rel="stylesheet">
    <link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-dark">
        <div class="container-fluid">
            <a class="navbar-brand" href="{{ url_for('index') }}"><i class="fas fa-bank me-2"></i>NeonBank</a>
        </div>
    </nav>
    <div class="container mt-5">
        <h1 class="text-center mb-4"><i class="fas fa-exchange-alt me-2"></i>Transfer</h1>
        <div class="card p-4 mx-auto" style="max-width: 500px;">
            <a href="{{ url_for('index') }}" class="btn btn-primary mb-3"><i class="fas fa-arrow-left me-2"></i>Back to Dashboard</a>
            <form method="post">
                <div class="mb-3">
                    <label for="from_account_id" class="form-label">From Account</label>
                    <select class="form-control" id="from_account_id" name="from_account_id" required aria-describedby="fromHelp">
                        {% for account in accounts %}
                        <option value="{{ account[0] }}">{{ account[0] }} - {{ account[1] }} (Balance: ${{ "%.2f" | format(account[2] | float) }})</option>
                        {% endfor %}
                    </select>
                    <div id="fromHelp" class="form-text">Select the source account.</div>
                </div>
                <div class="mb-3">
                    <label for="to_account_id" class="form-label">To Account</label>
                    <select class="form-control" id="to_account_id" name="to_account_id" required aria-describedby="toHelp">
                        {% for account in accounts %}
                        <option value="{{ account[0] }}">{{ account[0] }} - {{ account[1] }} (Balance: ${{ "%.2f" | format(account[2] | float) }})</option>
                        {% endfor %}
                    </select>
                    <div id="toHelp" class="form-text">Select the destination account.</div>
                </div>
                <div class="mb-3">
                    <label for="amount" class="form-label">Amount</label>
                    <input type="number" step="0.01" class="form-control" id="amount" name="amount" required aria-describedby="amountHelp">
                    <div id="amountHelp" class="form-text">Enter the transfer amount.</div>
                </div>
                <button type="submit" class="btn btn-primary w-100">Transfer</button>
            </form>
        </div>
    </div>
    <footer class="footer mt-5">
        <p>&copy; 2025 NeonBank. All transactions are secure and encrypted. For help, contact support@govbank.example.</p>
    </footer>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>